package link.anyauto.fsmgr.biz.settings;

import android.databinding.BaseObservable;
import android.databinding.Bindable;

import link.anyauto.fsmgr.BR;
import link.anyauto.fsmgr.domain.Settings;
import link.anyauto.fsmgr.util.CompareUtil;

/**
 * Created by Administrator on 2016/7/17.
 */
public class SettingsVM extends BaseObservable {

    @Bindable
    public String getSrv() {
        return settings.srv;
    }

    public void setSrv(String srv) {
        if(! CompareUtil.equals(settings.srv, srv)) {
            settings.srv = srv;
            notifyPropertyChanged(BR.srv);
        }
    }

    @Bindable
    public String getPort() {
        return settings.port;
    }

    public void setPort(String port) {
        if(!CompareUtil.equals(settings.port, port)) {
            settings.port = port;
            notifyPropertyChanged(BR.port);
        }
    }

    Settings settings;
}
